Skip to content

chore: sync dev with main#1876

Open
chip-peanut-bot[bot] wants to merge 8 commits intodevfrom
main
Open

chore: sync dev with main#1876
chip-peanut-bot[bot] wants to merge 8 commits intodevfrom
main

Conversation

@chip-peanut-bot
Copy link
Copy Markdown
Contributor

Branch Sync

main is 5 commits ahead of dev.

Commits to sync:

• fix: thread crossRegion flag for explicit cross-region KYC requests
• fix: only send crossRegion flag when true, omit for same-region
• feat: add REVERIFYING to approved statuses and SumsubKycStatus type
• fix: address review — REVERIFYING exclusion in status effect + token-less handling
• Merge pull request #1874 from peanutprotocol/fix/rail-enrollment-timing


Auto-generated by Chip 🐿️

kushagrasarathe and others added 8 commits April 6, 2026 21:04
pairs with backend fix that moves rail enrollment to webhook time.
cross-region moveToLevel now requires explicit crossRegion=true flag.
only set when user clicks "Verify now" on a different region —
automatic calls (fetchCurrentStatus, polling) never set it.
REVERIFYING is treated as approved for all access checks — user
retains existing provider access while re-verifying for a new region.
added to APPROVED_STATUSES set (single source of truth) so all
downstream readers (useKycStatus, useQrKycGate, useIdentityVerification,
KycStatusItem, etc.) automatically handle it correctly.
…less handling

1. add REVERIFYING to exclusion list in status-transition effect so it
   doesn't close the progress modal if received via websocket during
   SDK completion

2. handle REVERIFYING + no token same as APPROVED — call onKycSuccess
   instead of showing misleading "Could not initiate verification" error
fix: thread crossRegion flag for cross-region KYC
The 4 reward/surprise PostHog events (surprise_moment_shown,
reward_claim_shown, reward_claimed, reward_claim_dismissed) were
instrumented on PerkClaimModal but that component only renders for
"Card Pioneer" perks. The actual surprise moment perks (Rewards v2 -
Surprise 35c/65c) are claimed inline on the QR payment success screen,
which had zero PostHog instrumentation.

Added:
- REWARD_CLAIM_SHOWN + SURPRISE_MOMENT_SHOWN when perk UI appears
  after successful QR payment (useEffect with hasTrackedShow ref)
- REWARD_CLAIMED after successful mantecaApi.claimPerk()
- REWARD_CLAIM_DISMISSED on unmount if shown but not claimed

These events unblock KR2 measurement for Rewards v2.
CodeRabbit caught that hasTrackedPerkShown and perkClaimedRef survive
resetState(), so a second QR payment in the same session would skip
analytics tracking. Move refs before resetState and clear them there.
fix: instrument reward analytics on QR payment page
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Apr 9, 2026 7:42pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants